import 'dart:io';

import 'package:aws_s3_upload_lite/aws_s3_upload_lite.dart';

class AwsS3Util {
  static const region = "ap-southeast-1";
  static const accessKey = "AKIA5FTZDD36W5SXBRFJ";
  static const secretKey = "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";
  static const bucketName = "by-the";

  static upLoadImage(String imgPath,String fileName) async {
    var res = await AwsS3.uploadFile(
        accessKey: accessKey,
        secretKey: secretKey,
        file: File(imgPath),
        bucket: bucketName,
        region: region,
        destDir: "images",
        metadata: {"test": "test"},
        filename: fileName // optional
        );

    return res;
  }
}
